Skip to content

Repair existing SDDM Qt5 theme selections with missing greeter libraries - #10663

Open
surim0n wants to merge 2 commits into
omacom:quattrofrom
surim0n:fix/sddm-qt6-guard
Open

Repair existing SDDM Qt5 theme selections with missing greeter libraries#10663
surim0n wants to merge 2 commits into
omacom:quattrofrom
surim0n:fix/sddm-qt6-guard

Conversation

@surim0n

@surim0n surim0n commented Sep 7, 2026

Copy link
Copy Markdown

Summary

Addresses #10302 with a one-time repair for an existing selected Qt5 theme whose executable greeter has missing shared libraries. This is not a recurring guard and does not restore the Qt5 package stack.

Changes

  • Resolve vendor files, all visible local directory files, then /etc/sddm.conf; respect sections, comments, whitespace, EOF and effective ThemeDir.
  • Use the running SDDM daemon locale for competing filename ordering. Reject ambiguous ICU ties or unavailable service locale when needed; unambiguous settings need no running daemon.
  • Read scoped QtVersion conservatively. Preserve safe missing-theme/missing-executable fallbacks and working Qt6 selections; reject unsupported metadata instead of guessing.
  • Verify the packaged Qt6 replacement. Preserve vendor/suffix-backup files and use a local override when necessary.
  • Retain unique recovery copies under /var/lib/omarchy/sddm-backups/, outside loaded directories. Refuse unsafe write paths and publish only the intended change atomically.
  • Keep failures pending; never restart SDDM inside the migration.

Validation

  • Five original scenarios plus 39 Python regressions pass on Linux, including a real Arch VM. macOS passes five scenarios and 37 tests, with two Linux-ICU cases skipped.
  • Compiled upstream SDDM ConfigReader/ThemeMetadata and native Qt probes informed conservative parsing and collation handling.
  • Existing systemd tests, Bash syntax and git diff --check pass.

Actual SDDM and reboot

Head 8fa0aec tested in a disposable full-system x86_64 Arch VM: systemd 261.2, SDDM 0.21.0-7, Qt6 6.11.2 and ICU 78.3.

  • Packaged Qt5 greeter had real missing libraries; actual SDDM selected Maya and produced a black display. No ldd/systemctl stubs in this test.
  • Service en_US.UTF-8 and updater C exercised the live MainPID/proc locale path and agreed on the winning ICU-ordered configuration file.
  • Repair preserved the inactive custom configuration and comments, saved an exact backup, and did not restart SDDM. A repeat made no change or extra backup.
  • An explicit validation restart launched the Omarchy Qt6 greeter; inspected screenshots showed logo, lock/password field, keyboard focus and masked input.
  • A custom Qt6 selection stayed unchanged and launched successfully.
  • Real migration runner confirmed one-time marker behavior.
  • A real reboot returned to the working Omarchy Qt6 greeter.

Scope limits

The VM ran Arch plus actual SDDM and the Omarchy theme under Xorg, not a full Omarchy/Hyprland installation or an authenticated graphical-user login. The minimal display setup logged a default-cursor warning; successful greeter starts had no Qt6 dependency/QML-load errors. Relative ThemeDir assumes the standard service working directory /; custom overrides are outside verified scope.

Generated with Devin

Fresh Omarchy 4.x has no Qt5 packages. SDDM falls back to the Qt5 greeter
(/usr/bin/sddm-greeter) for any theme whose metadata.desktop does not declare
QtVersion=6. On a 4.x install that leaves the login screen permanently black.

Add a migration that, on update, detects when the active SDDM theme is not
Qt6 and the Qt5 greeter cannot run (missing shared libraries), then resets
Current= back to the packaged omarchy theme.

- migrations/1788380505.sh: the guard
- test/shell.d/sddm-qt6-guard-test.sh: coverage for safe, unsafe, runnable-Qt5,
  custom-Qt6, and no-theme cases

Fixes omacom#10302.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@surim0n
surim0n marked this pull request as draft September 8, 2026 03:50
Resolve service-locale-aware configuration precedence, respect theme
metadata and safe fallbacks, and retain recovery copies outside the
loaded directories. Refuse ambiguous inputs instead of guessing.

Cover the repair, malformed inputs, backups and migration lifecycle
with behavioral regressions.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@surim0n surim0n changed the title Guard SDDM theme selection against Qt5 greeter incompatibility Repair existing SDDM Qt5 theme selections with missing greeter libraries Sep 8, 2026
@surim0n

surim0n commented Sep 8, 2026

Copy link
Copy Markdown
Author

Reworked in 8fa0aec and kept draft. The earlier migration used incorrect precedence and could overwrite a working theme or delete an existing .bak. Those defects now have behavioral coverage and the unsafe backup operation is removed. The replacement uses effective settings, conservative metadata parsing, daemon-locale-aware ordering, retained recovery copies outside loaded directories, and explicit failure rather than guessing. Five original scenarios plus 39 Linux tests pass. This is a one-time repair; live Arch/SDDM login/reboot validation remains required.

@surim0n

surim0n commented Sep 8, 2026

Copy link
Copy Markdown
Author

Full-system follow-up: 8fa0aec now passed against real SDDM 0.21.0-7/Qt6 6.11.2 in a disposable x86_64 Arch VM. Reproduced black Maya/Qt5 startup with genuinely missing libraries; the repair used the live service locale, retained the exact config backup, and did not restart the daemon. A validation restart rendered the Omarchy Qt6 greeter; a custom Qt6 theme remained unchanged. Inspected focus/masked-input screenshots and rebooted back to the working greeter. All 39 regressions passed on the VM. This was Arch/Xorg plus the Omarchy theme, not full Omarchy/Hyprland login acceptance; that limit is documented. Marking ready for review.

@surim0n
surim0n marked this pull request as ready for review September 8, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant